#include "resource.h"

static const char filename[] = "sources.txt";

String source_list[7];  


String* get_rss_resources(){

	int i = 0;
	FILE *file = fopen ( filename, "r" );
	if ( file != NULL )
	{
		char line [ 128 ]; /* maximum line size */
		while ( fgets ( line, sizeof line, file ) != NULL ) /* read a line */
		{
			source_list[i] = line;
			i++;
		}
		fclose ( file );
	}
	else
	{
		perror ( filename ); 
	}
	
	source_list[i+1] = NULL;

	return &(source_list[0]);
}